module nct_arr_4442( Z, X, Y);
input [3:0] Y;
input [3:0] X;
output [3:0] Z;
wire [1] zero =0 ;
wire [1] one =1 ;
wire [1] P0_3 = X[3] & Y[0];
wire [1] P0_2 = X[2] & Y[0];
wire [1] P0_1 = X[1] & Y[0];
wire [1] sum1_3 = X[3] & Y[1];
wire [1] P1_2 = X[2] & Y[1];
wire [1] P1_1 = X[1] & Y[1];
wire [1] P1_0 = X[0] & Y[1];
wire [1] sum2_3 = X[3] & Y[2];
wire [1] P2_2 = X[2] & Y[2];
wire [1] P2_1 = X[1] & Y[2];
wire [1] P2_0 = X[0] & Y[2];
wire [1] sum3_3 = X[3] & Y[3];
wire [1] P3_2 = X[2] & Y[3];
wire [1] P3_1 = X[1] & Y[3];
wire [1] P3_0 = X[0] & Y[3];
wire [1] carry1_2;
wire [1] sum1_2;
ha1a(carry1_2,sum1_2,P1_2,P0_3);
//adding SHA
wire [1] carry1_1;
wire [1] sum1_1;
fa1a(carry1_1,sum1_1,one,P1_1,P0_2);
wire [1] carry2_2;
wire [1] sum2_2;
fa1a(carry2_2,sum2_2,P2_2,sum1_3,carry1_2);
wire [1] carry2_1;
wire [1] sum2_1;
fa1a(carry2_1,sum2_1,P2_1,sum1_2,carry1_1);
wire [1] carry2_0;
wire [1] sum2_0;
fa1a(carry2_0,sum2_0,P2_0,sum1_1,P1_0);
wire [1] carry3_2;
wire [1] sum3_2;
fa1a(carry3_2,sum3_2,P3_2,sum2_3,carry2_2);
wire [1] carry3_1;
wire [1] sum3_1;
fa1a(carry3_1,sum3_1,P3_1,sum2_2,carry2_1);
wire [1] carry3_0;
wire [1] sum3_0;
fa1a(carry3_0,sum3_0,P3_0,sum2_1,carry2_0);
//0: Generating fa
wire [1] carry4_0;
ha1a(carry4_0,Z[0],carry3_0,sum3_1);
//2: Generating fa
wire [1] carry4_1,sum4_1;
fa1a(carry4_1,Z[1],carry3_1,carry4_0,sum3_2);
//1: Generating fa
wire [1] carry4_2,sum4_2;
fa1a(Z[3],Z[2],sum3_3,carry4_1,carry3_2);
endmodule
